package org.example.test;

import lombok.Getter;
import lombok.Setter;

import java.util.concurrent.Callable;

@Getter
@Setter
public class MyCallable implements Callable<String> {

    private int index = 0;

    @Override
    public String call() throws Exception {
        try {
            Thread.sleep(5L);
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }
        for (int i = 0; i < 10; i++) {
            System.out.println("This is a my callable test for " + i);
        }
        return "Hello World for "+index+" times";
    }

}
